import request from '@/utils/request'

// 查询团队课程列表
export function listTeam(query) {
  return request({
    url: '/course/group/list',
    method: 'post',
    data: {
      courseName: query.courseName,
      pageIndex: query.pageNum - 1,
      pageSize: query.pageSize
    }
  })
}

// 查询团队课程详细
export function getTeam(id) {
  return request({
    url: '/gym/team/' + id,
    method: 'get'
  })
}

// 新增团队课程
export function addTeam(data) {
  return request({
    url: '/gym/team',
    method: 'post',
    data: data
  })
}

// 修改团队课程
export function updateTeam(data) {
  return request({
    url: '/gym/team',
    method: 'put',
    data: data
  })
}

// 删除团队课程
export function delTeam(id) {
  return request({
    url: '/gym/team/' + id,
    method: 'delete'
  })
}